<?php
class RedAction extends Action {
    public function redBag(){
        if(IS_POST){
            $file = './Conf/config.php';
            $config = array_merge(include $file,array_change_key_case($_POST,CASE_UPPER));
            $str = "<?php\r\nreturn " . var_export($config, true) . ";\r\n?>";
            if (file_put_contents($file, $str)) {
                $this->success('修改成功', 'houtai');
            } else {
                $this->error('修改失败');
            }
        }else{
            $this->display('houtai');
        }
    }
}